home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93c.txt / 000067_icon-group-sender _Tue Oct 5 10:24:55 1993.msg < prev    next >
Internet Message Format  |  1994-02-02  |  2KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 5 Oct 1993 09:17:11 MST
  2. Date: Tue, 5 Oct 93 10:24:55 CDT
  3. From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery)
  4. Message-Id: <9310051524.AA24738@ringer.cs.utsa.edu.sunset>
  5. To: neil@progress.com@cs.arizona.edu
  6. Cc: icon-group@cs.arizona.edu
  7. In-Reply-To: (Neil Galarneau's message of 28 Sep 93 19:25:08 GMT <1993Sep28.192508.6881@progress.com>
  8. Subject: Design for icon calling DLL entrypoints?
  9. Content-Length: 1281
  10. Status: R
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12.  
  13. Hi Neil,
  14.  
  15. I think your design for .DLL access is pretty reasonable, but when you
  16. implement it you may find a few adjustments will help.  For example, it
  17. is not easy to predefine a built-in record type in icont/iconx, and I
  18. think its not easy to perform an Icon table lookup from within C code
  19. in the run-time system.
  20.  
  21. I agree with you that callout() is a reasonable place to start from.
  22. If you want to go with callout, I would stick with it entirely and
  23. include the name of the entry point in the dll record you were talking
  24. about, and just pass that record in as callout's first argument.
  25.  
  26. Alternatively, you could define a new function
  27.     calldll(dll, x, convention, signature, a1, ..., aN)
  28. where x is your name or entry point, and the signature is the string encoding
  29. argument and return types as you mentioned.
  30.  
  31. To answer your other question, I believe the Icon preprocessor is
  32. not yet powerful enough to turn sndPlaySound("tada.wav", 0) into
  33. callout("sndPlaySound","tada.wav", 0).  Icon procedures are very
  34. good for this sort of thing, and for the table mapping names to
  35. records (should you decide to go with your record-based design).
  36.  
  37. It sounds like fun.  Good luck!
  38. Clint Jeffery
  39. cjeffery@cs.arizona.edu -or- jeffery@ringer.cs.utsa.edu
  40. The University of Texas at San Antonio
  41.